<basics2:ChildWindow x:Class="Rage.UI.ItemEditor" Title="Item Editor"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:basics="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:basics2="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.WPFToolkit"
  xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
  xmlns:System="clr-namespace:System;assembly=mscorlib"
  xmlns:local="clr-namespace:Rage.UI"
  xmlns:Rage="clr-namespace:Rage;assembly=Rage.Base.WPF"
  mc:Ignorable="d" Height="625" Width="800">

  <basics2:ChildWindow.Resources>
    <local:FactionConverter x:Key="FactionConverter" />
  </basics2:ChildWindow.Resources>
  <basics2:ChildWindow.DataContext>
    <Rage:Item />
  </basics2:ChildWindow.DataContext>

  <Grid x:Name="LayoutRoot" Background="White">
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="528" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <WrapPanel Grid.Column="0" Grid.Row="0" Orientation="Vertical">
      <local:GroupBox Margin="2,0" Width="260">
        <local:GroupBox.Header>
          <TextBlock FontWeight="Bold" Text="Basics" />
        </local:GroupBox.Header>
        <Grid Margin="0,-6,0,0">
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="155" />
          </Grid.ColumnDefinitions>

          <TextBlock x:Name="LB_Name" Grid.Row="1" Margin="2" HorizontalAlignment="Right" Text="Name:" VerticalAlignment="Center" />
          <TextBox x:Name="NameText" Grid.Column="1" Grid.Row="1" Margin="2" HorizontalAlignment="Stretch" Text="{Binding Mode=OneWay, Path=Name}" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_SetName" Grid.Row="2" Margin="2" HorizontalAlignment="Right" Text="Set Name:" VerticalAlignment="Center" />
          <TextBox x:Name="SetNameText" Grid.Column="1" Grid.Row="2" Margin="2" HorizontalAlignment="Stretch" Text="{Binding Mode=OneWay, Path=SetName}" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_iLevel" Grid.Row="3" Margin="2" HorizontalAlignment="Right" Text="Item Level:" VerticalAlignment="Center" />
          <inputToolkit:NumericUpDown x:Name="NUD_Level" Grid.Column="1" Grid.Row="3" Height="22" Margin="2" Width="60" HorizontalAlignment="Left" Maximum="500" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_Rating" Grid.Row="4" Margin="2" HorizontalAlignment="Right" Text="Rating:" VerticalAlignment="Center" />
          <inputToolkit:NumericUpDown x:Name="NUD_Rating" Grid.Column="1" Grid.Row="4" Height="22" Margin="2" Width="60" HorizontalAlignment="Left" Maximum="500" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_Id" Grid.Row="5" Margin="2" HorizontalAlignment="Right" Text="ID:" VerticalAlignment="Center" />
          <TextBox x:Name="IdNum" Grid.Column="1" Grid.Row="5" Margin="2,2,0,2" Text="{Binding Mode=OneWay, Path=Id}"/>
          <TextBlock x:Name="LB_Icon" Grid.Row="6" Margin="2" HorizontalAlignment="Right" Text="Icon:" TextWrapping="Wrap" VerticalAlignment="Center" />
          <TextBox x:Name="IconPathText" Grid.Column="1" Grid.Row="6" Margin="2,2,0,2" HorizontalAlignment="Stretch" Text="{Binding Mode=OneWay, Path=IconPath}" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_Type" Grid.Row="7" Margin="2" HorizontalAlignment="Right" Text="Type:" VerticalAlignment="Center" />
          <ComboBox x:Name="TypeCombo" Grid.Column="1" Grid.Row="7" Margin="2,2,0,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_Quality" Grid.Row="8" Margin="2" HorizontalAlignment="Right" Text="Quality:" VerticalAlignment="Center" />
          <ComboBox x:Name="QualityCombo" Grid.Column="1" Grid.Row="8" Margin="2,2,0,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_Slot" Grid.Row="9" Margin="2" HorizontalAlignment="Right" Text="Slot:" VerticalAlignment="Center" />
          <ComboBox x:Name="SlotCombo" Grid.Column="1" Grid.Row="9" Margin="2,2,0,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_Bind" Grid.Row="10" Margin="2" HorizontalAlignment="Right" Text="Bind Type:" VerticalAlignment="Center" />
          <ComboBox x:Name="BindCombo" Grid.Column="1" Grid.Row="10" Margin="2,2,0,2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
            <System:String>None</System:String>
            <System:String>BoP</System:String>
            <System:String>BoE</System:String>
            <System:String>BoA</System:String>
            <System:String>BoU</System:String>
          </ComboBox>
          <TextBlock x:Name="LB_ReqLightDark" Grid.Row="13" Margin="2" HorizontalAlignment="Right" Text="Bind Type:" VerticalAlignment="Center" />
          <ComboBox x:Name="CB_ReqLightDark" Grid.Column="1" Grid.Row="13" Margin="2,2,0,2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
            <ComboBoxItem Content="Light V" Tag="-5" />
            <ComboBoxItem Content="Light IV" Tag="-4" />
            <ComboBoxItem Content="Light III" Tag="-3" />
            <ComboBoxItem Content="Light II" Tag="-2" />
            <ComboBoxItem Content="Light I" Tag="-1" />
            <ComboBoxItem Content="No Requirement" Tag="0" />
            <ComboBoxItem Content="Dark I" Tag="1" />
            <ComboBoxItem Content="Dark II" Tag="2" />
            <ComboBoxItem Content="Dark III" Tag="3" />
            <ComboBoxItem Content="Dark IV" Tag="4" />
            <ComboBoxItem Content="Dark V" Tag="5" />
          </ComboBox>
          <TextBlock x:Name="LB_Cost" Grid.Row="11" Margin="2" HorizontalAlignment="Right" Text="Cost:" TextWrapping="Wrap" VerticalAlignment="Center" />
          <inputToolkit:NumericUpDown x:Name="CostText" Grid.Column="1" Grid.Row="11" Margin="2,2,0,2" Width="60" HorizontalAlignment="Left" Maximum="100000" Value="{Binding Mode=OneWay, Path=Cost}" VerticalAlignment="Center" />
          <TextBlock x:Name="LB_Unique" Grid.Row="12" Margin="2" HorizontalAlignment="Right" Text="Unique:" VerticalAlignment="Center" />
          <CheckBox x:Name="UniqueCheck" Grid.Column="1" Grid.Row="12" Margin="2" HorizontalAlignment="Left" IsChecked="{Binding Mode=OneWay, Path=Unique}" VerticalAlignment="Center" />
        </Grid>
      </local:GroupBox>
      <local:GroupBox Margin="2,0" Width="260">
        <local:GroupBox.Header>
          <TextBlock FontWeight="Bold" Text="Sockets" />
        </local:GroupBox.Header>
        <Grid Margin="0,-6,0,0">
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="140" />
          </Grid.ColumnDefinitions>

          <TextBlock Grid.Column="0" Grid.Row="0" Margin="2" HorizontalAlignment="Right" Text="Has Armrg/Hilt/Brl:" VerticalAlignment="Center" />
          <ComboBox x:Name="ArmoringHiltBarrelCombo" Grid.Column="1" Grid.Row="0" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
            <ComboBoxItem Content="None" />
            <ComboBoxItem Content="Armoring" />
            <ComboBoxItem Content="Barrel" />
            <ComboBoxItem Content="Hilt" />
          </ComboBox>
          <TextBlock Grid.Column="0" Grid.Row="1" Margin="2" HorizontalAlignment="Right" Text="Has Modification:" VerticalAlignment="Center" />
          <ComboBox x:Name="ModCombo" Grid.Column="1" Grid.Row="1" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
            <ComboBoxItem Content="None" />
            <ComboBoxItem Content="Mod" />
          </ComboBox>
          <TextBlock Grid.Column="0" Grid.Row="2" Margin="2" HorizontalAlignment="Right" Text="Has Enhancement:" VerticalAlignment="Center" />
          <ComboBox x:Name="EnhancementCombo" Grid.Column="1" Grid.Row="2" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
            <ComboBoxItem Content="None" />
            <ComboBoxItem Content="Enhancement" />
          </ComboBox>
          <TextBlock Grid.Column="0" Grid.Row="3" Margin="2" HorizontalAlignment="Right" Text="Has Color Crystal:" VerticalAlignment="Center" />
          <ComboBox x:Name="ColorCrystalCombo" Grid.Column="1" Grid.Row="3" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
            <ComboBoxItem Content="None" />
            <ComboBoxItem Content="Color Crystal" />
          </ComboBox>
        </Grid>
      </local:GroupBox>
      <local:GroupBox Margin="2,0" Width="260">
        <local:GroupBox.Header>
          <TextBlock FontWeight="Bold" Text="Weapon Properties" />
        </local:GroupBox.Header>
        <Grid Margin="0,-6,0,0">
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="155" />
          </Grid.ColumnDefinitions>

          <TextBlock Grid.Column="0" Grid.Row="0" Margin="2" HorizontalAlignment="Right" Text="Damage Range:" VerticalAlignment="Center" />
          <inputToolkit:NumericUpDown x:Name="MinDamageNum" Grid.Column="1" Grid.Row="0" Margin="2" Width="60" HorizontalAlignment="Left" Maximum="10000" Value="{Binding Mode=OneWay, Path=MinDamage}" VerticalAlignment="Center" />
          <TextBlock Grid.Column="1" Grid.Row="0" Margin="2" HorizontalAlignment="Center" Text="to" VerticalAlignment="Center" />
          <inputToolkit:NumericUpDown x:Name="MaxDamageNum" Grid.Column="1" Grid.Row="0" Margin="2" Width="60" HorizontalAlignment="Right" Maximum="10000" Value="{Binding Mode=OneWay, Path=MaxDamage}" VerticalAlignment="Center" />
          <TextBlock Grid.Column="0" Grid.Row="1" Margin="2" HorizontalAlignment="Right" Text="Damage Type:" VerticalAlignment="Center" />
          <ComboBox x:Name="DamageTypeComboBox" Grid.Column="1" Grid.Row="1" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
        </Grid>
      </local:GroupBox>
      <local:GroupBox Margin="2,0" Width="260">
        <local:GroupBox.Header>
          <TextBlock FontWeight="Bold" Text="Item Source Locations" />
        </local:GroupBox.Header>
        <Grid Margin="0,-6,0,0">
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" MaxWidth="250" />
            <ColumnDefinition Width="Auto" />
          </Grid.ColumnDefinitions>

          <TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Margin="2" Text="Source:" VerticalAlignment="Bottom" />
          <Button Grid.Column="2" Grid.Row="0" Height="23" Margin="0" Width="50" Click="BT_ItemSourceEdit_Click" Content="Edit" HorizontalAlignment="Right" Name="BT_ItemSourceEdit" VerticalAlignment="Top" />
          <TextBox x:Name="TB_Source" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Height="60" Margin="2" FontSize="10" IsEnabled="False" MaxWidth="250" TextWrapping="Wrap" />
          <TextBlock Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="2" Margin="2" Text="Note:" VerticalAlignment="Bottom" />
          <TextBox x:Name="TB_SourceNote" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="3" Height="60" Margin="2" FontSize="10" HorizontalAlignment="Stretch" MaxWidth="250" TextWrapping="Wrap" VerticalAlignment="Center" />
        </Grid>
      </local:GroupBox>
      <local:GroupBox Margin="2,0" Width="260">
        <local:GroupBox.Header>
          <TextBlock FontWeight="Bold" Text="Restrictions" />
        </local:GroupBox.Header>
        <Grid Margin="0,-6,0,0">
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" MaxWidth="250" />
          </Grid.ColumnDefinitions>

          <TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Margin="2" FontWeight="Bold" HorizontalAlignment="Center" Text="Required Classes" />
          <CheckBox x:Name="CK_Juggernaut" Grid.Column="0" Grid.Row="1" Margin="2" Content="Juggernaut" />
          <CheckBox x:Name="CK_Marauder" Grid.Column="0" Grid.Row="2" Margin="2" Content="Marauder" />
          <CheckBox x:Name="CK_Assassin" Grid.Column="0" Grid.Row="3" Margin="2" Content="Assassin" />
          <CheckBox x:Name="CK_Sorcerer" Grid.Column="0" Grid.Row="4" Margin="2" Content="Sorcerer" />
          <CheckBox x:Name="CK_Powertech" Grid.Column="0" Grid.Row="5" Margin="2" Content="Powertech" />
          <CheckBox x:Name="CK_Mercenary" Grid.Column="0" Grid.Row="6" Margin="2" Content="Mercenary" />
          <CheckBox x:Name="CK_Operative" Grid.Column="0" Grid.Row="7" Margin="2" Content="Operative" />
          <CheckBox x:Name="CK_Sniper" Grid.Column="0" Grid.Row="8" Margin="2" Content="Sniper" />
          
          <CheckBox x:Name="CK_Guardian" Grid.Column="1" Grid.Row="1" Margin="2" Content="Guardian" />
          <CheckBox x:Name="CK_Sentinel" Grid.Column="1" Grid.Row="2" Margin="2" Content="Sentinel" />
          <CheckBox x:Name="CK_Shadow" Grid.Column="1" Grid.Row="3" Margin="2" Content="Shadow" />
          <CheckBox x:Name="CK_Sage" Grid.Column="1" Grid.Row="4" Margin="2" Content="Sage" />
          <CheckBox x:Name="CK_Vanguard" Grid.Column="1" Grid.Row="5" Margin="2" Content="Vanguard" />
          <CheckBox x:Name="CK_Commando" Grid.Column="1" Grid.Row="6" Margin="2" Content="Commando" />
          <CheckBox x:Name="CK_Scoundrel" Grid.Column="1" Grid.Row="7" Margin="2" Content="Scoundrel" />
          <CheckBox x:Name="CK_Gunslinger" Grid.Column="1" Grid.Row="8" Margin="2" Content="Gunslinger" />

          <TextBlock Grid.ColumnSpan="2" Grid.Row="9" Margin="2" FontWeight="Bold" HorizontalAlignment="Center" Text="Required Faction" />
          <ComboBox Grid.ColumnSpan="2" Grid.Row="10" Margin="2" MaxWidth="250" Name="CB_Faction">
            <System:String>Neutral</System:String>
            <System:String>Republic</System:String>
            <System:String>Imperial</System:String>
          </ComboBox>
        </Grid>
      </local:GroupBox>
      <Button x:Name="TorheadButton" Margin="4" Click="TorheadButton_Click" Content="Open in Knotor" HorizontalAlignment="Center" />
    </WrapPanel>

    <local:GroupBox Grid.Column="2">
      <local:GroupBox.Header>
        <TextBlock FontWeight="Bold" Text="Stats" />
      </local:GroupBox.Header>
      <Grid Margin="0,-5,0,0">
        <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ScrollViewer Grid.Column="2" Margin="4" Padding="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto">
          <local:StatControl x:Name="ItemStats" VerticalAlignment="Top" />
        </ScrollViewer>
        <local:GroupBox Grid.Row="1" Margin="4,-2,4,4" Padding="2" FontWeight="Bold" Header="Special Effects">
          <StackPanel>
            <ComboBox x:Name="SpecialEffectList" Height="22" Margin="2" FontWeight="Normal" />
            <DockPanel LastChildFill="False">
              <Button Margin="2" Width="60" Click="AddSpecial_Click" Content="Add" FontWeight="Normal" DockPanel.Dock="Left" />
              <Button x:Name="DeleteSpecialButton" Margin="2" Width="60" Click="DeleteSpecialButton_Click" Content="Delete" FontWeight="Normal" DockPanel.Dock="Right" />
              <Button x:Name="EditSpecialButton" Margin="2" Width="60" Click="EditSpecialButton_Click" Content="Edit" FontWeight="Normal" DockPanel.Dock="Right" />
            </DockPanel>
          </StackPanel>
        </local:GroupBox>
      </Grid>
    </local:GroupBox>

    <Button x:Name="DeleteButton" Grid.Column="0" Grid.Row="1" Margin="4,4,0,4" Width="75" Click="DeleteButton_Click" Content="Delete" HorizontalAlignment="Left" VerticalAlignment="Center" />
    <StackPanel Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal">
      <Button x:Name="BT_Equip" Margin="2,4" Width="75" Click="EquipButton_Click" Content="Equip" />
      <Button x:Name="BT_Cancel" Margin="2,4" Width="75" Click="CancelButton_Click" Content="Cancel" />
      <Button x:Name="BT_OK" Margin="2,4" Width="75" Click="OKButton_Click" Content="OK" />
    </StackPanel>
  </Grid>
</basics2:ChildWindow>